package cn.bby.tools.actions.str.decode;

import cn.bby.tools.actions.str.BaseStringProcessAction;
import cn.hutool.core.codec.Base64;
import com.intellij.openapi.actionSystem.AnActionEvent;

/**
 * Base64解码Action
 *
 * @author lingma
 * @since 2025/11/7
 */
public class DecodeBase64Action extends BaseStringProcessAction {
    @Override
    public String process(AnActionEvent event, String selectedText) {
        try {
            return Base64.decodeStr(selectedText);
        } catch (Exception e) {
            return selectedText;
        }
    }
}